feat(rivetkit-core): expose metrics endpoint#5013
Conversation
|
🚅 Deployed to the rivet-pr-5013 environment in rivet-frontend
|
Code Review: feat(rivetkit-core): expose metrics endpointOverviewThis PR adds a Issues1. Dead code in The early return in // handle_fetch: always returns early for Metrics
if matches!(route, RegistryHttpRoute::Framework(FrameworkHttpRoute::Metrics)) {
return handle_metrics_fetch(&request);
}
let instance = match self.active_actor(actor_id).await { ... };
// ...
// handle_framework_fetch: this arm is dead code
FrameworkHttpRoute::Metrics => handle_metrics_fetch(&request),The intent (serving metrics without requiring an active actor) is correct, but the unreachable match arm is confusing. Consider removing 2. Dual env-var design is a footgun Requiring both 3. Inconsistent error format for Prometheus render failures (serverless path) In 4. Env vars read on every request
Suggestions
Positives
MissingNo tests added. The bearer token parser ( |
dc95591 to
f602228
Compare
87b147e to
f21c5de
Compare

Description
Please include a summary of the changes and the related issue. Please also include relevant motivation and context.
Type of change
How Has This Been Tested?
Please describe the tests that you ran to verify your changes.
Checklist: